package cn.com.geoway.booksystem.controller.houtai;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/houtai/bookborrow")
public class Houtai_BookBorrow_Controller {

    /**
     * /houtai/bookborrow/manage
     * @return
     * @throws Exception
     */
    @RequestMapping("/manage")
    public ModelAndView manage() throws Exception {
        ModelAndView mav = new ModelAndView();
        mav.addObject("title", "图书借阅");
        mav.setViewName("/admin/page/bookborrow/bookborrow_manage");
        return mav;
    }

    @RequestMapping("/manages")
    public ModelAndView manage1() throws Exception {
        ModelAndView mav = new ModelAndView();
        mav.addObject("title", "借阅记录");
        mav.setViewName("/admin/page/bookborrow/bookborrows_manage");
        return mav;
    }

    @RequestMapping("/add")
    public ModelAndView add(@RequestParam(value = "id", required = false) Integer id)throws Exception {
        ModelAndView mav = new ModelAndView();
        mav.addObject("btn_text", "借阅");
        mav.addObject("save_url", "/admin/booksearch/borrow");
        mav.addObject("bookId",id);
        mav.setViewName("/admin/page/bookborrow/add_update");
        return mav;
    }

}
